﻿<!--#include file="mymin.asp"-->
<card title="添加友链类别"><p>
<%
dim classs,pid,br,ID
ID=request.QueryString("ID")
classs=Trim(Request.Form("class"))
pid=Request.Form("pid")
br=Request.Form("br")
if classs="" then
	Noright("类别名称不能为空！<br/>")
else
	IF Not IsEmpty(Pid) and Not IsNumeric(Pid) Then
		Noright("排序必须是数字！<br/>")
	else
		classsave
	end if
end if

w "<a href='Link_class.asp?sid="&sid&"'>[分类管理]</a><br/><a href='mymin_index.asp?sid="&sid&"'>[友链管理]</a>"
Call Last

sub classsave()
	dim Rs,Sql
	Set RS=server.createobject("adodb.recordset")
	Sql="select * from 74hu_linkc"
	RS.open sql,myconn,1,3
	RS.addnew
	RS("class")=classs
	RS("pid")=pid
	RS("br")=br
	RS.update()
	rs.close
	Set rs=Nothing
	w "友链类别添加成功<br/>"
End Sub

Sub Noright(str)
	w str &"<a href='Link_add.asp?sid="&sid&"'>返回修改</a><br/>"
End Sub

%>